<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%
	String basePath = request.getContextPath();
	String path = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+basePath+"/";
	request.setAttribute("path",path);
%>
<!doctype html>
<html>
<head>
	<meta charset="utf-8">
	<meta name="viewport" content="initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no"/>
	<meta name="format-detection" content="telephone=no,address=no,email=no"/>
	<meta name="keywords" content="" />
	<meta name="description" content="" />
	<title>虎丘婚纱城在线商城_登录</title>
	<script type="text/javascript" src="${path}/mobileTerminal/js/jquery.js"></script>
	<script type="text/javascript" src="${path}/js/jquery-2.1.1.min.js"></script>
	<link href="${path}/mobileTerminal/css/style.css" rel="stylesheet" media="all">
	<link rel="shortcut icon" href="${path}/mobileTerminal/img/favicon.png">
	<script src="http://res.wx.qq.com/connect/zh_CN/htmledition/js/wxLogin.js"></script>
</head>
<script>
    function checkForm() {
        var flag = true;
        var resp = form1.resp.value;
        if (resp != "null"&& resp!=null&&resp!="") {
            if (resp != 'resp') {
                alert(resp);
                flag = false;
            }
        }
        return flag;
    }
</script>
<body class="hu_shopping" onload="checkForm()">
	<header>
		<div class="headerwrap">
			<div class="header_wrap">
				<a href="javascript:history.go(-1);" class="return_last">返回</a>
				<h1>登录</h1>
			</div>
		</div>
	</header><!-- header -->
	<div class="content_wrap login_register" id="login_wrap">
		<div class="logo_wrap"><a href=#"><img src="${path}/mobileTerminal/img/logo.png"></a></div><!-- logo_wrap -->
		<form id="form1" action="${path}/toLogin" method="post" name="form1" class="logreg_form" onsubmit="return checkForms(this)">
			<input id="resp" name="resp" style="display: none" value="${resp}">
<p class="form_txt">
<input value="" type="number" name="phone" id="phone" onfocus="document.getElementById('dn_note').style.display='none'" onblur="if(value=='')document.getElementById('dn_note').style.display='block'">
<span id="dn_note" class="form_note">用户名/手机</span>
</p>
<p class="form_txt">
<input value="" type="password" name="password" id="password" onfocus="document.getElementById('mma_note').style.display='none'" onblur="if(value=='')document.getElementById('mma_note').style.display='block'">
<span id="mma_note" class="form_note">请输入密码</span>
</p>
			<p class="login_button">
				<input type="submit" value="登录" />
				<a class="go_register" href="${path}/register">注册</a>
				<span class="clear"></span>
			</p>
			<p class="login_button">
				<a class="wxlogin_but" href="https://open.weixin.qq.com/connect/qrconnect?appid=wxcfff48663c212c9d&redirect_uri=http%3A%2F%2Fwww.kaaction.com%2fAdmin%2ffrontEndIndex&response_type=code&scope=snsapi_login&state=2014#wechat_redirect">微信登录</a>
			</p>
        </form>
	</div><!-- content_wrap -->

	<div class="footer_copyright">
		<p>苏州知行合一网络科技有限公司提供技术支持</p>
	</div><!-- footer_copyright -->

	 <script type="text/javascript">
		/*$(function () {
                $('.login_but').click(function(){
                   var phoneNumber=/^(13[0-9]|15[012356789]|17[678]|18[0-9]|14[57])[0-9]{8}$/,
                            idCardNo=/^\d{15}(\d{2}(\d|x))?$/i;
                    var dn = $.trim($('#dn').val());// 电话

                    if(!phoneNumber.test(dn)){
                        alert('请输入正确的手机号码!');
                        ajaxStatus = true;
                        return false;
                    }

					var mma = $('#mma').val();
                    if(mma == '') {
                        alert("请输入密码");
                        return false;
                    }

                    $('#login_form').submit();
                })
            });*/
        function checkForms(form) {
            var ph =form.phone.value;
            var ps =form.password.value;
            var error = $('#dn_note');
            var reError  = $('#mma_note');
           /* if(ph!=""&& ph!=null || ps!=""&&ps!=null){
                return true;
			}else {
               alert("账号或密码不能为空!");
                var error = $('.form_note');
                error.html('<font color="red">对不起,密码不能为空!</font>');
                return false;
			}*/
            if (ph == "" || ph == null) {
                error.html('<font color="red">账号不能为空!</font>');
                return false;
            }
            if (ps == "" || ps == null) {
                reError.html('<font color="red">密码不能为空!</font>');
                return false;
            }
            return true;
        }
    </script>
</body>
</html>